package piece;

import java.util.ArrayList;
import java.util.List;
import object.Piece;
import object.Square;
import static object.Piece.SQUARE_BORDER;
//I
public class PieceI extends Piece {

    public PieceI(int image) {
        //第一种变化   --
        List<Square> squares0 = new ArrayList<>();
        squares0.add(new Square(image, 0, SQUARE_BORDER));
        squares0.add(new Square(image, SQUARE_BORDER, SQUARE_BORDER));
        squares0.add(new Square(image, SQUARE_BORDER * 2, SQUARE_BORDER));
        squares0.add(new Square(image, SQUARE_BORDER * 3, SQUARE_BORDER));
        //第二种变化  I
        List<Square> squares1 = new ArrayList<>();
        squares1.add(new Square(image, SQUARE_BORDER, 0));
        squares1.add(new Square(image, SQUARE_BORDER, SQUARE_BORDER));
        squares1.add(new Square(image, SQUARE_BORDER, SQUARE_BORDER * 2));
        squares1.add(new Square(image, SQUARE_BORDER, SQUARE_BORDER * 3));
        super.changes.add(squares0);
        super.changes.add(squares1);
        super.setSquares(getDefault());
    }
}
